<template>
  <div class="box">
    <h3>{{title}}</h3>
    <slot :games="games"></slot>
  </div>
</template>

<script>
export default {
  name: 'Category',
  props: ['title'],
  data() {
    return {
      games: ['魂斗罗', '彩虹岛', '扫雷']
    }
  },
}
</script>

<style scoped>
.box {
  width: 300px;
  height: 400px;
  background: skyblue;
}

.box h3 {
  height: 40px;
  line-height: 40px;
  background: yellowgreen;
  text-align: center;
}
</style>